package com.unknown.wiki.details.repository;

import com.unknown.common.function.SEFunction;
import com.unknown.network.NetworkCallback;
import com.unknown.wiki.base.BaseRepository;
import com.unknown.wiki.details.WikiDetailsContract;
import com.unknown.wiki.model.Wiki;

public class WikiDetailsRepository extends BaseRepository implements WikiDetailsContract.IWikiDetailsRepository {

    @Override
    public void getWiki(String wikiId, SEFunction<Wiki> onSuccessListener, SEFunction<Throwable> onFailureListener) {
        wikiAPI.getWiki(wikiId).enqueue(new NetworkCallback<>(onSuccessListener, onFailureListener));
    }
}
